_require local "../../../../basis.smi"
_require local "../../../extensions/debug/main/Bug.smi"
_require local "../../../libs/ids/main/LocalID.smi"
_require local "../../../libs/env/main/SSet.smi"
_require local "../../../libs/env/main/SEnv.smi"
_require local "../../../libs/list-utils/main/ListSorter.smi"

_require "../../../compilerIRs/machinecode/main/MachineCode.ppg.smi"
_require "../../../compilerIRs/llvmir/main/LLVMIR.ppg.smi"
_require local "../../../data/runtimetypes/main/RuntimeTypes.ppg.smi"
_require local "../../../data/runtimetypes/main/FFIAttributes.ppg.smi"
_require local "../../../data/name/main/CodeLabel.smi"
_require local "../../../data/name/main/ExternSymbol.smi"
(* _require local "../../../libs/toolchain/main/Filename.smi" *)
_require local "../../../data/control/main/Control.smi"
_require local "../../../data/builtin/main/BuiltinPrimitive.ppg.smi"
(* _require local "../../../data/types/main/TypesBasics.smi" *)
_require local "../../../data/types/main/Types.ppg.smi"
_require local "../../../compilerIRs/machinecode/main/MachineCodeRename.smi"
_require "../../../compilerIRs/absyn/main/InterfaceName.ppg.smi"
_require local "./ToplevelSymbol.smi"

structure LLVMGen =
struct
  val compile : {targetTriple : string}
                -> InterfaceName.toplevel_prelude * MachineCode.program
                -> LLVMIR.program
end
